﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MonoGame.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Turnota.Map
{
    public class Tile
    {
        private Texture2D baseImage;
        private Texture2D blockedImage;
        private Texture2D hiddenImage;
        public Vector2 Position;
        public float Height;
        public bool Walkable;

        public Vector2 CenterPosition
        {
            get
            {
                return new Vector2(Position.X + (baseImage.Width / 2), Position.Y + (baseImage.Height / 2));
            }
        }

        public Tile(Vector2 position, float height)
        {
            baseImage = Game1.contentManager.Load<Texture2D>("StandardTile");
            blockedImage = Game1.contentManager.Load<Texture2D>("TileBlocked");
            hiddenImage = Game1.contentManager.Load<Texture2D>("TileHidden");
            this.Position = position;
            this.Height = height;
            this.Walkable = true;
        }

        public void Draw()
        {
            Game1.spriteBatch.Draw(baseImage, Position, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
        }
    }
}
